﻿<?php require './inc/global.php';?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>隆领 WEB MANAGE</title>
    <!--[if IE]><script type="text/javascript"> document.createElement("section");</script><![endif]-->
    <script language="javascript" type="text/javascript" src="jquery-1.11.3.min.js"></script>
    <style>
        *{margin:0px;padding:0px}
        *{border:0px solid #F00}
        .{overflow:hidden}

        .login{width:50%;height:auto;margin-left:25%;margin-top:178px;}
        .top{width:100%;height:188px;}
        .logo{width:50%;height:188px;float:left}


        .zi{font-size:20px;font-family:"微软雅黑";color:#333;height:40px;text-align:center;line-height:40px;margin-top:52px}
        .zi span{background:#FFF;color:red;font-size:18px;padding:15px 5px; font-weight:700}
        .xiao{font-size:14px;font-family:"微软雅黑";color:#333;text-align:center;margin-top:22px;}

        .login-center{width:48%;height:188px;float:right}
        .login-center ul .yong{height:26px;margin-top:20px}
        .login-center ul li{list-style:none;font-size:14px;color:#333;font-family:"微软雅黑";margin-top:20px}

        input{height:26px;width:40%;border:1px solid #cdcfcf;font-family:"微软雅黑"; margin-left:3%}
        .anniu{margin-left:10%}
        .anniu .login-button{background:#22b7e7;color:#FFF}
        .anniu .chongzhi{background:#cdcfcf;color:#22b7e7}
        .bottom{width:100%;height:212px}
        .bottom p{margin-top:176px; text-align:center;font-size:14px;color:#666; font-family:"微软雅黑"}
    </style>
</head>
<body>



<div class="login">
    <div class="top">
        <div class="logo">
            <p class="zi"><span>longling</span> 网站管理后台</p>
            <p class="xiao">打造具有营销价值的企业智慧网站</p>
        </div>

        <form class="form1" id="form1" action="login.php" method="post">
            <div class="login-center">
                <ul>
                    <li class="yong" for="login"> 用户名<input name="username" id="username" type="text" class="input-text1" value=""></li>
                    <li class="yong" for="password"> 密&nbsp 码 <input name="password" id="password" type="password" class="input-text1"></li>
                    <li class="yanzhengma" for="code"> 验证码<input name="checkcode" id="checkcode" type="checkcode" class="input-text1" style="width:14%" onkeydown="return SubmitKeyClick(event)">


                        <img src="./inc/imagecode.php" onclick="loadimagecode('imagecode')"  title="点击刷新验证码" class="verify_img" id="checkcode"  style="cursor:pointer; vertical-align:bottom; margin-left:5px;width:96px; height:26px"></li>
                    <li class="anniu">
                        <input id="BtnOK" type="submit" value="登陆" name="submit" class="login-button" style="width:20%" onclick="return checklogin();" >

                    </li>
                </ul>
            </div>
        </form>
        <input id="clear" type="submit" value="重填" name="clear" class="chongzhi" style="width:10% ;position: relative; bottom: 28px;left: 66%;" >

    </div>
    <div class="bottom border">
        <p>成都隆领科技有限公司  &nbsp 联系电话：18980030309</p>
    </div>

</div>























<script>

    $("#clear").click(function(){
        $("#username").attr("value","");
        $("#password").attr("value","");
        $("#checkcode").attr("value","");
    })


    function GetRandomNum(Min,Max){
        var Range = Max - Min;
        var Rand = Math.random(now = new Date());
        return(Min + Math.round(Rand * Range));
    }
    //var erke = GetRandomNum(1,5);
    //document.write("<div style='background:url(bg/bg"+erke+".jpg) no-repeat;background-size:cover' id=Change></div>");
    function getid(s){
        return(typeof s=='object')?s:document.getElementById(s)}
    function loadimagecode(imageid){
        getid(imageid).src='./inc/imagecode.php?sid='+Math.random()
    }
    function checklogin(){
        if(/^('| )+$/.exec(getid('username').value)||getid('username').value=='')
        {
            getid('login_msg').innerHTML='<font color="red" style="font-size:10px;">请填写登录用户名</font>';
            getid('username').select();
            return false
        }
        else{
            getid('login_msg').innerHTML=''
        }
        if(getid('password').value=='')
        {
            getid('login_msg').innerHTML='<font color="red" style="font-size:10px;">请填写登录密码</font>';
            getid('password').select();
            return false
        }
        else{
            getid('login_msg').innerHTML=''
        }if(!/^[0-9A-Za-z]{4}$/.exec(getid('checkcode').value))
        {
            getid('login_msg').innerHTML='<font color="red" style="font-size:10px;">请填写登录验证码</font>';
            getid('checkcode').select();
            return false
        }else{
            getid('login_msg').innerHTML='正在登陆中...'}
    }

</script>
</body>
</html>